package com.wdb.user.controller;

import com.wdb.user.repository.UserRepository;
import com.wdb.user.service.UserService;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserController implements UserService {

    @Resource
    private UserRepository userRepository;

    @Override
    public String getUserName(@RequestParam Integer id) {

        System.out.println(" =============================== " + id + " ==========================");

//        System.out.println( 1 / 0);

        return userRepository.getName(id);
    }

}
